<?php
// +----------------------------------------------------------------------
// | Longbing [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright Chengdu longbing Technology Co., Ltd.
// +----------------------------------------------------------------------
// | Website http://longbing.org/
// +----------------------------------------------------------------------
// | Sales manager: +86-13558882532 / +86-13330887474
// | Technical support: +86-15680635005
// | After-sale service: +86-17361005938
// +----------------------------------------------------------------------

declare(strict_types=1);

namespace app\boss\info;

use app\card\model\Job;
use app\card\model\User;
use app\card\service\UserService;
use app\Common\model\LongbingUserInfo;
use longbingcore\diy\BaseSubscribe;

/**
 * @author shuixian
 * @DataTime: 2019/12/11 16:23
 * Class Subscribe
 * @package app\ucenter\info
 */
class Subscribe extends BaseSubscribe
{
    /**
     * 相应个人中心工具菜单
     *
     * @return mixed
     * @author shuixian
     * @DataTime: 2019/12/12 11:24
     */
    public function onAddWorkCenterToolsMenu(){

        //判断当前用户是否是BOSS
        $is_boss = User::where('id', $this->getUserId())->value('is_boss') ;

        if($is_boss){
            $dataMenu= [
                "title" =>  '数据中心',
                "icon" =>  'iconshujuzhongxin',
                "link" =>  '/boss/pages/index',
                "linkType" =>  '4',
            ];

            $teamMenu= [
                "title" =>  '团队中心',
                "icon" =>  'icontuanduizhongxin',
                "link" =>  '/boss/pages/team/index',
                "linkType" =>  '4',
            ];

            return [$dataMenu , $teamMenu];
        }


        return [];


    }
}